package com.health_predict_springboot.dao;

import com.health_predict_springboot.pojo.SysPopupConfig;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface SysPopupConfigMapper {
    // 根据ID查询
    SysPopupConfig selectByConfigId(Integer configId);
    
    // 查询所有弹窗配置
    List<SysPopupConfig> selectAllPopupConfigs();
    
    // 插入弹窗配置
    int insertPopupConfig(SysPopupConfig popupConfig);
    
    // 更新弹窗配置
    int updatePopupConfig(SysPopupConfig popupConfig);
    
    // 删除弹窗配置
    int deletePopupConfig(Integer configId);
    
    // 分页查询
    List<SysPopupConfig> selectPopupConfigsByPage(Map<String, Object> params);
    
    // 查询总数
    int selectPopupConfigCount(Map<String, Object> params);
    
    // 查询启用的弹窗配置
    SysPopupConfig selectActivePopupConfig();
}